﻿<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Query.aspx.cs" Inherits="Query" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" >
<head runat="server">
    <title>无标题页</title>
</head>
<body>
    <form id="form1" runat="server">
    <div>
        &nbsp;</div>
    <asp:Label ID="Type" Text="类型" runat="server" Visible="true" />
    <asp:DropDownList ID="Typelist" runat="server" Visible="true" AutoPostBack="true" OnSelectedIndexChanged ="TypeSelecetChanged" />
    <asp:DropDownList ID="TypeClass" Width="80px" Visible="true" runat="server" AutoPostBack="true" OnSelectedIndexChanged="ClassSelecetChanged" />
    <asp:Label ID="GoodsName" Text="商品名" runat="server" Visible="true" />
    <asp:TextBox ID="GoodsNameInput" runat="server" Visible="true" />
    <asp:Button ID="ButtonQuery" runat="server" OnClick="QueryClick" Visible="true" Text="查询" />
        <br />
        <br />
        <br />
        <br />
    <asp:GridView ID="Goods" runat="server" AutoGenerateColumns="False" DataKeyNames="goodsID" OnRowDeleting="RowDeleting" OnRowCommand="RowUpdate">
      <Columns>
            <asp:TemplateField HeaderText="删除" ShowHeader="False">   
            <ItemTemplate>   
                <asp:LinkButton runat="server" CausesValidation="False" CommandName="Delete"   
                    Text="删除" OnClientClick='<%#  "if (!confirm(\"你确定要删除" + Eval("goodsName").ToString() + "吗?\")) return false;"%>'></asp:LinkButton>   
            </ItemTemplate>   
          </asp:TemplateField>
           <asp:TemplateField HeaderText="修改" ShowHeader="False">   
            <ItemTemplate>   
               <asp:LinkButton ID="linkbtnName" runat="server" CommandName="Show" CommandArgument='<%# Eval("goodsID") %>' Text="修改记录"></asp:LinkButton>
            </ItemTemplate>   
          </asp:TemplateField>
                <asp:BoundField DataField="goodsID" HeaderText="商品编号" Visible="true"
                   SortExpression="goodsID"  />
                <asp:BoundField DataField="goodsName" HeaderText="商品名" SortExpression="goodsName" />
                <asp:BoundField DataField="typeName" HeaderText="类型" SortExpression="typeName" />
                <asp:BoundField DataField="brandName" HeaderText="品牌" SortExpression="brandName" />
                <asp:BoundField DataField="goodsType" HeaderText="商品类型" SortExpression="goodsType" />
                <asp:BoundField DataField="goodsLocation" HeaderText="商品产地" SortExpression="goodsLocation" />
                <asp:BoundField DataField="packageCount" HeaderText="数量" SortExpression="packageCount" />
                <asp:BoundField DataField="goodsPackage" HeaderText="包装" SortExpression="googdsPackage" />
                <asp:BoundField DataField="goodsMaterial" HeaderText="商品材料" SortExpression="goodsMaterial" />
                <asp:BoundField DataField="goodsStyle" HeaderText="商品风格" SortExpression="goodsStyle" />
                <asp:BoundField DataField="goodsBill" HeaderText="商品订单" SortExpression="goodsBill" />
                <asp:BoundField DataField="goodsGuaranteePeriod" HeaderText="商品保质期" SortExpression="goodsGuaranteePeriod" />
                <asp:BoundField DataField="goodsCityService" HeaderText="同城服务" SortExpression="goodsCityService" />
                <asp:BoundField DataField="goodsUnit" HeaderText="商品单位" SortExpression="goodsUnit" />
                <asp:BoundField DataField="goodsCreator" HeaderText="商品创建者" SortExpression="goodsCreator" />
                <asp:BoundField DataField="goodsCreateDate" HeaderText="商品创建时间" SortExpression="goodsCreateDate" />
            </Columns>
    </asp:GridView>
    </form>
</body>
</html>
